SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[usp_countsapplypopulation]
	
	(
	@param_id int 
	)
	
AS
	/* SET NOCOUNT ON */
	SELECT count(*)
	  from    JOL_Recruitment_Participants_apply ,JOL_Recruitment_ApplyingRecords,JOL_Recruitment_Position	WHERE JOL_Recruitment_Participants_apply.[state]='True'AND JOL_Recruitment_Participants_apply.recruitment=@param_id AND JOL_Recruitment_Position.participants_apply=JOL_Recruitment_Participants_apply.id AND JOL_Recruitment_ApplyingRecords.recruit_position=JOL_Recruitment_Position.id
	RETURN

GO
